package cn.yza.设计模式.观察者模式.观察者2;

import java.io.File;

/** 收到通知后发送邮件
 * @author Honglixi
 * @create 2022-05-17 14:55
 */
public class EmailNotificationListener implements EventListener{
    private String email;

    public EmailNotificationListener(String email) {
        this.email = email;
    }

    @Override
    public void update(String eventType, File file) {
        System.out.println("Email to" + email + ": Someone has performed" + eventType);
    }
}
